package com.zzhb.listener;

import java.util.Arrays;
import java.util.List;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;

public class UsingDepMultipleInstListener implements ExecutionListener {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5187440899740917371L;

	@Override
	public void notify(DelegateExecution execution) {
		String eventName = execution.getEventName();
		System.out.println("====eventName====" + eventName + "===leaderList====="
				+ execution.getVariable("leaderListStr").toString());
		String leaderListStr = execution.getVariable("leaderListStr").toString();
		List<String> leaderList = Arrays.asList(leaderListStr.split(","));
		execution.setVariable("leaderList", leaderList);
	}

}
